package com.tianyadu.mmall.core.validate.code;

import lombok.Data;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * 图片验证码
 *
 * @author xueyj
 * @date 2019-11-05 22:36
 */
@Data
public class ImageCode extends ValidateCode {
    /**
     * BufferedImage
     */
    private BufferedImage image;

    /**
     * 构造图形验证码
     *
     * @param image    BufferedImage
     * @param code     验证码
     * @param expireIn 过期描述
     */
    public ImageCode(BufferedImage image, String code, int expireIn) {
        super(code, expireIn);
        this.image = image;
    }

    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
        super(code, expireTime);
        this.image = image;
    }
}